home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cocktail / reuse.lha / reuse / c / StringMem.h < prev    next >
C/C++ Source or Header  |  1992-08-18  |  2KB  |  73 lines

  1. # ifndef yyStringMem
  2. # define yyStringMem
  3.  
  4. /* $Id: StringMem.h,v 1.6 1992/08/07 14:36:51 grosch rel $ */
  5.  
  6. /* $Log: StringMem.h,v $
  7.  * Revision 1.6  1992/08/07  14:36:51  grosch
  8.  * added comments
  9.  *
  10.  * Revision 1.5  1992/02/18  12:52:30  grosch
  11.  * changed tString from unsigned char * to char *
  12.  *
  13.  * Revision 1.4  1992/01/30  13:12:51  grosch
  14.  * complete redesign: pointer instead of array index
  15.  *
  16.  * Revision 1.3  1991/11/21  14:28:16  grosch
  17.  * new version of RCS on SPARC
  18.  *
  19.  * Revision 1.2  91/07/17  17:23:48  grosch
  20.  * introduced ARGS trick for ANSI compatibility
  21.  * 
  22.  * Revision 1.1  90/07/04  14:34:08  grosch
  23.  * introduced conditional include
  24.  * 
  25.  * Revision 1.0  88/10/04  11:44:47  grosch
  26.  * Initial revision
  27.  * 
  28.  */
  29.  
  30. /* Ich, Doktor Josef Grosch, Informatiker, Sept. 1987 */
  31.  
  32. # include <stdio.h>
  33. # include "ratc.h"
  34.  
  35. # ifdef __STDC__
  36. # define ARGS(parameters)    parameters
  37. # else
  38. # define ARGS(parameters)    ()
  39. # endif
  40.  
  41. typedef unsigned short * tStringRef;
  42.  
  43. extern    tStringRef PutString    ARGS((register char * s, register cardinal length));
  44.             /* Stores string 's' in the string memory and    */
  45.             /* returns a reference to the stored string.    */
  46.  
  47. extern    void    StGetString    ARGS((register tStringRef r, register char * s));
  48.             /* Returns the string 's' from the string    */
  49.             /* memory which is referenced by 'r'.        */
  50.  
  51. /* extern cardinal LengthSt    ARGS((register tStringRef r)); */
  52. # define LengthSt(stringref) (* stringref)
  53.             /* Returns the length of the string 's'        */
  54.             /* which is referenced by 'r'.            */
  55.  
  56. extern    bool    IsEqualSt    ARGS((tStringRef r, register char * s));
  57.             /* Compares the string referenced by 'r' and    */
  58.             /* the string 's'.                */
  59.             /* Returns true if both are equal.        */
  60.  
  61. extern    void    WriteString    ARGS((FILE * f, tStringRef r));
  62.             /* The string referenced by 'r' is printed on    */
  63.             /* the file 'f'.                */
  64.  
  65. extern    void    WriteStringMemory ();
  66.             /* The contents of the string memory is printed    */
  67.             /* on standard output.                */
  68.  
  69. extern    void    InitStringMemory ();
  70.             /* The string memory is initialized.        */
  71.  
  72. # endif
  73.